const UserHandler = require('../handlers/userHandler')

class UserController {
  // 查询人员信息
  async findUsers () {
    const result = await UserHandler.findAll()
    return result
  }
  async findUser (id) {
    const result = await UserHandler.findUser(id)
    return result
  }
  async createUser (params) {
    const result = await UserHandler.createUser(params)
    return result
  }
  async deleteUser (id) {
    const result = await UserHandler.deleteUser(id)
    return result
  }
  async updateUser (params, id) {
    const result = await UserHandler.updateUser(params, id)
    return result
  }
}

module.exports = new UserController()